package com.cosmoplat.mom.iot.client.constants;

import com.cosmoplat.mom.iot.client.IotApi;
import com.cosmoplat.mom.iot.client.http.BodyType;
import com.cosmoplat.mom.iot.client.http.HttpMethod;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author yotta
 * @date 2025/6/16
 */
@AllArgsConstructor
@Getter
public enum IotApis implements IotApi {

    AUTH("授权获取Token", "/platform/user/login", HttpMethod.POST, BodyType.JSON.getContentType()),
    DEVICE_TYPE_LIST("获取设备类型列表", "/iot-biz/api/getDeviceTypeList", HttpMethod.GET, BodyType.JSON.getContentType()),
    DEVICE_LIST_BY_TYPE_ID("根据设备类型ID查询设备列表", "/iot-biz/api/getDeviceListByTypeId", HttpMethod.GET, BodyType.JSON.getContentType()),
    DATA_ITEM_LIST_BY_DEVICE_ID("根据设备ID查询数据项列表", "/iot-biz/api/getDataItemListByDeviceId", HttpMethod.GET, BodyType.JSON.getContentType()),
    DEVICE_ALARM_RECORD_PAGE("分页查询设备报警记录", "/iot-biz/api/alarm/DEVICE/getTenantAlarms", HttpMethod.POST, BodyType.JSON.getContentType()),
    DEVICE_HISTORY_DATA_PAGE("分页查询设备历史数据", "/iot-biz/api/device/meta/{deviceId}/values/timeseriesByKeys", HttpMethod.POST, BodyType.JSON.getContentType()),
    DATA_ITEM_LIST_BY_DEVICE_CODE("根据设备CODE查询数据项列表", "/iot-biz/api/getDataItemListByDeviceCode", HttpMethod.GET, BodyType.JSON.getContentType()),
    ;

    private final String apiName;
    private final String path;
    private final String method;
    private final String contentType;
}
